package com.bf.hotpoint.repository.mongo;

import java.util.List;
import org.springframework.data.geo.Circle;
import org.springframework.data.geo.Distance;
import org.springframework.data.geo.GeoResults;
import org.springframework.data.geo.Point;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import com.bf.hotpoint.domain.TestObject;

@Repository
public interface TestRepository extends MongoRepository<TestObject, String> {
	public TestObject findByName(String name);
    public List<TestObject> findByAge(int age);
   
    public long deleteByAge(int age);
    
    public GeoResults<TestObject> findByLocationNear(Point point,Distance distance);
    
    public GeoResults<TestObject> findByLocationWithin(Circle circle);
}
